<?php
use \services\models\UpFileData;
$conId = Yii::$app->controller->id;
$actId = Yii::$app->controller->action->id;
$id = Yii::$app->request->get('category',0);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>首页</title>
<link rel="stylesheet" type="text/css" href="<?= Yii::getAlias('@static')?>/wap/common/css/swiper-3.3.1.min.css">
<link rel="stylesheet" type="text/css" href="<?=Yii::getAlias('@static')?>/wap/minisite/shares/css/style.css">
</head>
<body class="page_index">
<div class="banner">
  <div class="swiper-index swiper-container">
    <div class="swiper-wrapper">
      <?php foreach($mactive as $key=>$act):?>
      <div class="swiper-slide"> <a onclick="_hmt.push(['_trackEvent', '活动广告图<?=($key+1)?>', 'click', '活动广告图<?=($key+1)?>']);" href="<?=Yii::$app->urlManager->createUrl(["$conId/share-list",'activity_id'=>$act->id]);?>">
            <img src="<?= UpFileData::showImage($act->c_image) ?>"></a>
      </div>
      <?php endforeach;?>
    </div>
    <div class="swiper-pagination"></div>
  </div>
</div>
<div class="channel">
  <h1>分类频道</h1>
  <div class="channel_name_wrap">
      <div class="channel_name">
		<?php foreach($mactiveCategory as $idx=>$name): if($idx<0)continue;?>
        <div data-id="<?= $idx?>" <?= $idx==$id?'class="selected"':''?>><a onclick="_hmt.push(['_trackEvent', '<?=$name?>', 'click', '<?=$name?>']);" href="<?=Yii::$app->urlManager->createUrl(["$conId/$actId",'category'=>$idx]);?>"><?=$name?></a></div>
		<?php endforeach;?>
      </div>
  </div>
  <div class="channel_log" id="channelLog"></div>
  <ul class="channel_items" id="channelItems"></ul>
</div>
<div class="clear"></div>
<div class="temp_loadmore">加载中...</div>
<div class="publish_fixed"> 
	<a id="join-share" href="javascript:;"><span class="icon icon_publish"></span><br> 发布</a>
</div>
<script src="<?= Yii::getAlias('@static')?>/wap/common/js/jquery-2.2.0.min.js"></script> 
<script src="<?= Yii::getAlias('@static')?>/wap/common/js/swiper-3.3.1.jquery.min.js"></script> 
<script src="<?= Yii::getAlias('@static')?>/wap/common/js/fastclick.min.js"></script>
<script src="<?= Yii::getAlias('@static')?>/wap/common/js/king.wap.js"></script>
<script src="<?= Yii::getAlias('@static')?>/wap/minisite/shares/js/index.js"></script>
<script>
var requestListUrl = "<?=Yii::$app->urlManager->createUrl(["$conId/index-list-ajax",'category'=>$id,'page'=>'']);?>";
var requestPraiseUrl = "<?=Yii::$app->urlManager->createUrl(["$conId/click-like", 'asf_id'=>'']);?>";
var requestShaerUrl = "<?=Yii::$app->urlManager->createUrl(["$conId/join-share"]);?>";
var uid = "<?= $uid;?>";
var loginUrl = "<?=$loginUrl?>";
</script>
<div style="display: none;">
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?a52dc90ef87f9447cc988c4aaf719dba";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</div>

<!-- 微信分享文案,其他浏览器自动忽略 -->
<?= common\widgets\WeChatShareWidget::widget(['type'=>$this->context->layout_data]);?>
</body>
</html>